<template>
  <card 
    v-bind="options1"
    @save="save"
    >
    <y-form v-bind="options2"></y-form>
  </card>
</template>

<script>
export default {
    data(){
        return {
            options1:{
                title:'Sample / Add',
                type:'form',
                btns:['save','back'],
            },
            options2:{
                models:[
                    { name:'张三',code:'EMP00001',dept:'***********' },
                    { phone:'17666475089',address:'广东省中山市',email:'yewen@yell.run'},
                ],
                items:[
                    { 
                        title:'基本信息',
                        fields:[
                            { type:'input',field:'name', text:'姓名',required:true,placeholder:'请输入员工姓名',span:6 },
                            { type:'input', field:'code',text:'工号',autocode: 'empNo' },
                            { type:'select', field:'dept',text:'部门',required:true,placeholder:'请选择员工部门' },
                            { type:'input', field:'post',text:'职位',required:true},
                            { type:'phone', field:'phone',text:'手机号',required:true},
                            { type:'date', text:'生日' },
                            { type:'input', text:'学历' },
                            { type:'email', text:'邮箱' },
                            { type:'address', text:'籍贯' },
                            { type:'input', text:'专业' },
                            { type:'input', text:'住址' },
                        ] 
                    },
                    {
                        title:'工资信息',
                        fields:[
                            { type:'bank', text:'工资卡号' },
                            { type:'decamal', text:'基本工资' },
                            { type:'decamal', text:'绩效工资' },
                            { type:'decamal', text:'社保扣款' },
                            { type:'decamal', text:'试用薪资' },
                            { type:'decamal', text:'转正薪资' },
                            { type:'decamal', text:'岗位工资' },
                        ]
                    }
                ],
            }
        }
    },
    methods:{
        save(){
        }
    }
}
</script>

<style lang="scss" scoped>

</style>